package com.zhuohao.cloud.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.zhuohao.cloud.entity.User;

@FeignClient(name="microservice-user")
public interface  UserFeignClient {
	
	@RequestMapping(method = RequestMethod.GET, value = "/simple/{id}")
	public User findById(@PathVariable("id") Long id);
	
	@RequestMapping(method = RequestMethod.POST,value = "/postUser")
	public User postUser(@RequestBody User user) ;
	
	@RequestMapping(method = RequestMethod.GET,value = "/getUser")
	public User getUser(@RequestParam("id") Long id,@RequestParam("name") String name);
	
	
}
